package edu.hadassah.prettyprint.printer.xmlprinter;

import edu.hadassah.prettyprint.doc.xml.Attribute;
import edu.hadassah.prettyprint.doc.xml.Comment;
import edu.hadassah.prettyprint.doc.xml.Tag;
import edu.hadassah.prettyprint.doc.xml.Text;

public abstract class AbstractXMLPrinterDecorator implements XMLDocumentPrinter{

	protected final XMLDocumentPrinter documentPrinter;

	public AbstractXMLPrinterDecorator(XMLDocumentPrinter documentPrinter) {
		this.documentPrinter = documentPrinter;
	}

	/**
	 * @param attribute
	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#print(edu.hadassah.prettyprint.doc.xml.Attribute)
	 */
	public void print(Attribute attribute) {
		documentPrinter.print(attribute);
	}

	/**
	 * @param comment
	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#print(edu.hadassah.prettyprint.doc.xml.Comment)
	 */
	public void print(Comment comment) {
		documentPrinter.print(comment);
	}

//	/**
//	 * @param tag
//	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#print(edu.hadassah.prettyprint.doc.xml.Tag)
//	 */
//	public void print(Tag tag) {
//		documentPrinter.print(tag);
//	}

	/**
	 * @param text
	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#print(edu.hadassah.prettyprint.doc.xml.Text)
	 */
	public void print(Text text) {
		documentPrinter.print(text);
	}

	/**
	 * @return
	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#getResultString()
	 */
	public String getResultString() {
		return documentPrinter.getResultString();
	}

	/**
	 * @param tag
	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#printEnd(edu.hadassah.prettyprint.doc.xml.Tag)
	 */
	public void printEnd(Tag tag) {
		documentPrinter.printEnd(tag);
	}

	/**
	 * @param tag
	 * @see edu.hadassah.prettyprint.printer.xmlprinter.XMLDocumentPrinter#printStart(edu.hadassah.prettyprint.doc.xml.Tag)
	 */
	public void printStart(Tag tag) {
		documentPrinter.printStart(tag);
	}

}